/**
 * 优惠券相关接口
 *
 */
import request from '@/utils/request'

// 获取会员核销优惠券列表
export function getMemberUseCouponRecord(params) {
  return request({
    url: '/memberAdmin/member/useCouponHistory',
    method: 'get',
    params: params
  })
}
// 获取卡发放历史数据
export function getCardHistory(params) {
  return request({
    url: '/memberAdmin/member/getCardHistory',
    method: 'get',
    params: params
  })
}

// 获取会员领取优惠券列表
export function getMemberGetCouponRecord(params) {
  return request({
    url: '/memberAdmin/member/getCouponHistory',
    method: 'get',
    params: params
  })
}

// 超级会员邀请者-查询商圈券报名数据
export function getQueryEnrollmentData(params) {
  return request({
    url: '/couponAdmin/coupon/queryEnrollmentData',
    method: 'post',
    data: params
  })
}

// 优惠券核销统计数据
export function getCouponVerifyCount(params) {
  return request({
    url: '/couponAdmin/records/coupon/getCouponVerifyRecordCount',
    method: 'post',
    data: params
  })
}
export function getCouponVerifyCountMoney(params) {
  return request({
    url: '/couponAdmin/records/coupon/getCouponVerifyCountMoney',
    method: 'post',
    data: params
  })
}

// 卡核销统计数据
export function getCardVerifyCount(params) {
  return request({
    url: '/couponAdmin/records/card/getCardVerifyRecordCount',
    method: 'post',
    data: params
  })
}

// 获取订单统计
export function getWriteOffOrderCount(params) {
  return request({
    url: '/order_admin/writeOffOrderRecord/getWriteOffOrderCount',
    method: 'post',
    data: params
  })
}

// 优惠券核销统计数据
export function getCouponVerify(params) {
  return request({
    url: '/couponAdmin/records/coupon/getCouponVerifyRecord',
    method: 'post',
    data: params
  })
}

// 卡核销统计数据
export function getCardVerify(params) {
  return request({
    url: '/couponAdmin/records/card/getCardVerifyRecord',
    method: 'post',
    data: params
  })
}

// 获取订单统计
export function getWriteOffOrder(params) {
  return request({
    url: '/order_admin/writeOffOrderRecord/getWriteOffOrder',
    method: 'post',
    data: params
  })
}
// 优惠券核销报表导出
export function exportCouponWriteOff(params) {
  return request({
    url: '/business_admin/task/exportCouponWriteOff',
    method: 'post',
    data: params
  })
}
// 卡核销报表导出
export function exportCardWriteOff(params) {
  return request({
    url: '/business_admin/task/exportCardWriteOff',
    method: 'post',
    data: params
  })
}
// 订单核销报表导出
export function exportWriteOffOrder(params) {
  return request({
    url: '/business_admin/task/exportWriteOffOrder',
    method: 'post',
    data: params
  })
}
